package com.rock.code.report.monitor.service.impl;

import com.rock.code.base.service.impl.BaseServiceImpl;
import com.rock.code.common.handover.DataSource;
import com.rock.code.report.monitor.dao.JbMonitorReportDao;
import com.rock.code.report.monitor.service.JbMonitorReportService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * 监控 Service 实现
 *
 * @author xubh
 * @date 2018/01/21
 */
@Service
public class JbMonitorReportServiceImpl extends BaseServiceImpl<JbMonitorReportDao> implements JbMonitorReportService {

    @Resource
    private JbMonitorReportDao jbMonitorReportDao;

    @Override
    @DataSource("itnmsdb")
    public List queryAlarmTendencyContrast(HashMap map) {
        return jbMonitorReportDao.queryAlarmTendencyContrast(map);
    }

    @Override
    @DataSource("itnmsdb")
    public List querySeverityAlarmList(String start_time, String end_time) {
        HashMap map=new HashMap();
        map.put("start_time",start_time);
        map.put("end_time",end_time);
        return jbMonitorReportDao.querySeverityAlarmList(map);
    }

    @Override
    @DataSource("itnmsdb")
    public List queryTodayAlarmCount() {
        return jbMonitorReportDao.queryTodayAlarmCount();
    }

    @Override
    @DataSource("itnmsdb")
    public List queryTodayAlarmLevel() {
        return jbMonitorReportDao.queryTodayAlarmLevel();
    }

    @Override
    @DataSource("itnmsdb")
    public List queryMonitorKpiCount() {
        return jbMonitorReportDao.queryMonitorKpiCount();
    }

    @Override
    @DataSource("itnmsdb")
    public List queryPlatformAngle() {
        return jbMonitorReportDao.queryPlatformAngle();
    }

    @Override
    @DataSource("itnmsdb")
    public List queryPlatformAlarmSituation() {
        return jbMonitorReportDao.queryPlatformAlarmSituation();
    }

    @Override
    @DataSource("itnmsdb")
    public List queryBusinessAngle() {
        return jbMonitorReportDao.queryBusinessAngle();
    }

    @Override
    @DataSource("itnmsdb")
    public List queryBusinessAlarmSituation() {
        return jbMonitorReportDao.queryBusinessAlarmSituation();
    }
}